﻿/**********************************天使物流*******************************************
* 功能描述:物资管理——入库管理
* 作者:孟帅龙
* 时间:2022/1/20
* 
**********************************天使物流*******************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TianShiProject.Models.Common;
using TianShiProject.Models.Materials.NewLibrarys;
using Volo.Abp.Application.Services;

namespace TianShiProject.Materials.NewLibrarys
{
    public class RuKuService : ApplicationService
    {
        private readonly IRuKuRepository _ruKuRepository;

        public RuKuService(IRuKuRepository ruKuRepository)
        {
            _ruKuRepository = ruKuRepository;
        }

        #region 入库管理——查询分页显示
        /// <summary>
        /// 入库管理——查询分页显示
        /// </summary>
        /// <param name="GoodsNamen"></param>
        /// <param name="Texture"></param>
        /// <param name="Nationw"></param>
        /// <param name="Province"></param>
        /// <param name="PaymentType"></param>
        /// <param name="Registrant"></param>
        /// <param name="pageindex"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public async Task<PageResponse<NewLibraryDto>> GetNewLibraryPageShow(string GoodsNamen, int Texture, int Nationw, int Province, int PaymentType, string Registrant, int pageindex = 1, int pagesize = 3)
        {
            return await _ruKuRepository.GetNewLibraryPageShow(GoodsNamen, Texture, Nationw, Province, PaymentType, Registrant, pageindex, pagesize);
        }
        #endregion

        #region 入库管理——逻辑删除
        /// <summary>
        /// 入库管理——逻辑删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<int> DeleteNewLibrary(int id)
        {

            return await _ruKuRepository.DeleteNewLibrary(id);
        }
        #endregion

        #region 入库管理——批量删除
        /// <summary>
        /// 入库管理——批量删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public async Task<int> DeleteBatchNewLibrary(string ids)
        {
            return await _ruKuRepository.DeleteBatchNewLibrary(ids);
        }
        #endregion

        #region 入库管理——编辑
        /// <summary>
        /// 入库管理——编辑
        /// </summary>
        /// <param name="newLibraryDto"></param>
        /// <returns></returns>
        public async Task<int> PutUpdateNewLibrary(NewLibraryDto newLibraryDto)
        {
            return await _ruKuRepository.PutUpdateNewLibrary(newLibraryDto);
        }
        #endregion

        #region 入库管理——添加
        /// <summary>
        /// 入库管理——添加
        /// </summary>
        /// <param name="newLibraryDto"></param>
        /// <returns></returns>
        public async Task<int> PostAddNewLibrary(NewLibraryDto newLibraryDto)
        {
            return await _ruKuRepository.PostAddNewLibrary(newLibraryDto);
        }
        #endregion
    }
}
